#include "NetTest.h"
#include "include/socket.h"
#include <windows.h>
using namespace SocketPool;
NetTest::NetTest(void) : sc_(NULL)
{
}


NetTest::~NetTest(void)
{
}

void NetTest::run()
{
	while(!sc_)
	{
		Sleep(100);
	}

	char echo_msg[] = {4, 0, 44, 0};
	sc_->write(echo_msg, 4);
	system("pause");
	sc_->disconnect();
}

void NetTest::set_socket( SocketPool::Socket* sc )
{
	assert(sc_ == NULL);
	assert(sc);
	this->sc_ = sc;
}
